<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>用户管理</title>
    <link rel="stylesheet" type="text/css" href="assets/style/css.css">
    <script type="text/javascript" src="assets/js/jquery.min.js"></script>
    <script type="text/javascript" src="assets/js/layer/layer.js"></script>
    <script type="text/javascript" src="assets/js/laypage/laypage.js"></script>
    <script type="text/javascript" src="assets/js/change.js"></script>
    <script type="text/javascript" src="assets/js/function.js"></script>
</head>
<body> 
 <!-- 顶部操作 -->
<div class="header">
    <div class="itemHeader">
            <button class="addnew op-btn"><img src="assets/img/edit_add.png" alt="" style="margin-right: 5px">添加论坛</button>
            <input type="text" name="keyword" size="24" maxlength="255" placeholder="请输入关键字" id="keyword" class="text">
             <select>
              <option value ="升序">升序</option>
              <option value ="降序">降序</option>
            </select>
    </div>
    <!-- 用户列表 -->
    <div class="user fr">
            <span class="user-name">admin ▼</span>
            <ul class="user-list user-list-dis">
                <li><a href="javascript:void(0)">切换账号</a></li>
                <li><a href="javascript:void(0)">退出</a></li>
            </ul>
    </div>
</div>

<!-- 数据列表 -->   
<div class="itemsContent">
    <div class="listTitle">
        <table>
            <tr>
                <th class="id">ID</th>
                <th class="project-id">
                    <div class="checkbox">
                        游戏ID
                    </div>
                </th>

                <th class="listFileName">
                    <table class="i">
                        <tr>
                            <th class="tf">
                                <div class="txt_hidden">名称</div>
                            </th>
                        </tr>
                    </table>
                </th>
                <th class="gamestyle">类型</th>
                <th class="pinyin">语言</th>
                <th class="status">有效</th>
                <th class="detailtype">游戏类型</th>
                <th><div class="publisher">发行商</div></th>
                <th><div class="development">开发者</div></th>
                <th class="onlinetime">上线时间</th>
                <th><div class="summary">系统版本</div></th>
                <th class="operation">操作</th>
            </tr>
        </table>
    </div>
 <!-- 数据列表内容 -->
    <div class="list">
        <table>
            <tbody id="fileList">
            <!-- 填充内容start -->
                <tr>
                    <th class="id">1</th>
                    <th class="project-id">
                        <div class="checkbox">
                            3
                        </div>
                    </th>
                   <th class="listFileName">
                        <table class="i">
                            <tr>
                                <th class="tf">
                                    <div class="txt_hidden">刀塔dddddd</div>
                                </th>
                            </tr>
                        </table>
                    </th>
                    <th class="gamestyle">S、Y</th>
                    <th class="pinyin">英文</th>
                    <th class="status">有效</th>
                    <th class="detailtype">角色扮演</th>
                    <th><div class="development">开发者33333333</div></th>
                    <th><div class="publisher">发行商22222222222</div></th>
                    <th class="onlinetime">2003/4/09</th>
                    <th><div class="summary">概述rrrrrrrrrrrrrrrrrrrrrrrr</div></th>
                    <th class="operation">
                        <span class="delete">删除</span>
                        <span class="edit">编辑</span>
                        <span class="channel"><a href="addchannel.html">渠道</a></span>
                        <span class="bbs"><a href="javascript:void(0)">论坛</a></span>
                    </th>
                 </tr>


                 <tr>
                   <th class="id">2</th>
                    <th class="project-id">
                        <div class="checkbox">
                            4
                        </div>
                    </th>
                   <th class="listFileName">
                        <table class="i">
                            <tr>
                                <th class="tf">
                                    <div class="txt_hidden">跑跑卡丁车</div>
                                </th>
                            </tr>
                        </table>
                    </th>
                    <th class="gamestyle">D</th>
                    <th class="pinyin">中文</th>
                    <th class="status">有效</th>
                    <th class="detailtype">角色扮演</th>
                    <th><div class="development">开发者</div></th>
                    <th><div class="publisher">发行商</div></th>
                    <th class="onlinetime">2011/3/05</th>
                    <th><div class="summary">概述</div></th>
                    <th class="operation">
                        <span class="delete">删除</span>
                        <span class="edit">编辑</span>
                        <span class="channel"><a href="addchannel.html">渠道</a></span>
                        <span class="bbs"><a href="javascript:void(0)">论坛</a></span>
                    </th>
                 </tr>


                 <tr>
                   <th class="id">3</th>
                    <th class="project-id">
                        <div class="checkbox">
                            4
                        </div>
                    </th>
                   <th class="listFileName">
                        <table class="i">
                            <tr>
                                <th class="tf">
                                    <div class="txt_hidden">炉石传说</div>
                                </th>
                            </tr>
                        </table>
                    </th>
                    <th class="gamestyle">Y</th>
                    <th class="pinyin">null</th>
                    <th class="status">有效</th>
                    <th class="detailtype">角色扮演</th>
                    <th><div class="development">开发者</div></th>
                    <th><div class="publisher">发行商</div></th>
                    <th class="onlinetime">2015/3/12</th>
                    <th><div class="summary">概述</div></th>
                    <th class="operation">
                        <span class="delete">删除</span>
                        <span class="edit">编辑</span>
                        <span class="channel"><a href="addchannel.html">渠道</a></span>
                        <span class="bbs"><a href="javascript:void(0)">论坛</a></span>
                    </th>
                 </tr>
                <!-- 填充内容end -->
            </tbody>
        </table>
    </div>
    <!-- 页码 -->
    <div id="pager" class="paginations"></div>

    <!-- 弹出层 -->
    <div class="pop-content" >
        <form id="fm" method="post">
            <div class="close-pop">关闭</div>
            <div class="game-name">
                <label>游戏名称:</label>
                <input type="text" id="txtChinese" class="textbox" size="20" value=""  onblur="query()" /> 
            </div>
            <div class="game-style">
                <label>平台:</label>
                <div class="select-list g-style-list">
                    <span class="project-tag-dim g-s">手游</span>
                    <span class="project-tag-dim g-y">页游</span>
                    <span class="project-tag-dim g-d">端游</span>
                    <span class="project-tag-dim g-w">单机电玩</span>
                </div>
            </div>
            <div class="game-pinyin">
                <label>首字母(大写):</label>
                <input  id="capital" class="textbox"  disabled="disabled">
            </div>
            <div class="game-status">
                <label>状态:</label>
                <div class="select-list g-style-list">
                    <span class="project-tag-dim  s-y" >有效</span>
                    <span class="project-tag-dim project-tag-dim-selected s-d" >待完善</span>
                    <span class="project-tag-dim s-n" >无效</span>
                </div>
            </div>
            <div class="game-d-style">
                <label>游戏类型:</label>
                <div class="select-list tag-list">
                    <span class="project-tag-dim" tag_id="1">角色扮演</span>
                    <span class="project-tag-dim" tag_id="2">冒险</span>
                    <span class="project-tag-dim" tag_id="3">动作</span>
                    <span class="project-tag-dim" tag_id="4">策略</span>
                    <span class="project-tag-dim" tag_id="5">射击</span>
                    <span class="project-tag-dim" tag_id="6">体育</span>
                    <span class="project-tag-dim" tag_id="7">竞速</span>
                    <span class="project-tag-dim" tag_id="8">模拟</span>
                    <span class="project-tag-dim" tag_id="9">休闲益智</span>
                    <span class="project-tag-dim" tag_id="10">竞技游戏</span>
                    <span class="project-tag-dim" tag_id="11">音乐游戏</span>
                </div>
            </div>
            <div class="game-development">
                <label>开发者:</label>
                <input class="textbox" value="">
            </div>
            <div class="game-publisher">
                <label>发行商:</label>
                <input class="textbox"  value="" >
            </div>
      
            <div class="game-summary">
                <label>游戏概况:</label>
                <textarea name="summary" onKeyUp="if(this.value.length > 3000) this.value=this.value.substr(0,3000)"></textarea>
            </div>
            <div class="game-now">
                <label >上线时间:</label>
                <span id="show"></span>
                <input  class="textbox" id="showh" value=""  disabled="disabled">
            </div>
            <div id="buttons">
                <a href="javascript:void(0)"  onclick="" >保存</a>
                <a href="javascript:void(0)" onclick="" >取消</a>
            </div>
        </form>
    </div>
</div>


<script  type="text/javascript" >

    //点击添加新游戏
    $('.addnew').on('click',function(){
        $('.pop-content').css('display','block');
        $('#txtChinese').focus();
        $('#show').css('display','block');
        $('#showh').css('display','none');
    });

    //点击编辑
    $('.edit').on('click',function(){
        $('.pop-content').css('display','block');
        $('#show').css('display','none');
        $('#showh').css('display','block');
        $('#txtChinese').focus();
        var name = $(this).parents().children('.listFileName').text().trim();//获取当前游戏名称
        var firstcapital = $(this).parents().children('.pinyin').text().trim();//获取当前首字母
        var gamestyle = $(this).parents().children('.style').text().trim();//获取当前类型
        var gametime = $(this).parents().children('.onlinetime').text().trim();//获取当前时间
        document.getElementById('txtChinese').value = name;
        document.getElementById('capital').value = firstcapital;
        document.getElementById('showh').value = gametime;
    });

    //关闭弹层
    $('.close-pop').on('click',function(){
        $('.pop-content').css('display','none');
        document.getElementById('txtChinese').value = "";
        document.getElementById('capital').value = "";
    });

    //tag选择
    $('.project-tag-dim').on('click',function(){
        $(this).toggleClass('project-tag-dim-selected');
    });
    $('.game-status .project-tag-dim').on('click',function(){
        $('.game-status .project-tag-dim').removeClass('project-tag-dim-selected');
        $(this).addClass('project-tag-dim-selected');
    });

</script>
</body>
</html>